package com.zj.controller;

import com.zj.pojo.Friend;
import com.zj.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("hello")
public class HelloContorller {
    @Autowired
    private User user;

    @Autowired
    private Friend friend;

    @RequestMapping("hello")
    public String hello(){
        return "hello my user "+user;
    }

    @RequestMapping("world")
    public String world(){
        return "world my friend "+friend;
    }
}
